home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac-Source 1994 July
/
Mac-Source_July_1994.iso
/
C and C++
/
Compilers⁄Interps
/
little-c
/
Ex6.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1993-10-04
|
368 b
|
25 lines
|
[
TEXT/????
]
/* The loop statements. */
main()
{
int a;
char ch;
/* the while */
puts("Enter a number: ");
a = getnum();
while(a) {
print(a);
print(a*a);
puts("");
a = a - 1;
}
/* the do-while */
puts("enter characters, 'q' to quit");
do {
ch = getche();
} while(ch!='q');
/* the for */
for(a=0; a<10; a = a + 1) {
print(a);
}
}